import request from '@/utils/request';

// 表格列表接口
export function list(params: any) {
    return request({
        url: 'tienchin/activity/list',
        method: 'get',
        params
    });
}

// 渠道名称数据遍历
export function moreList() {
    return request({
        url: 'tienchin/activity/channel/list',
        method: 'get',
    });
}

// 增加
export function add(data: any) {
    return request({
        url: 'tienchin/activity',
        method: 'post',
        data
    });
}

// 点击编辑进行查询回显数据
export function Xiu(params: any) {
    return request({
        url: 'tienchin/activity' + `/${params}`,
        method: 'get',
    });
}

// 点击确定修改数据
export function gai(data: any) {
    return request({
        url: 'tienchin/activity',
        method: 'put',
        data
    });
}

// 删除接口
export function delEte(params: any) {
    return request({
        url: 'tienchin/activity' + `/${params}`,
        method: 'delete',
    });
}

// 导出接口
export function chu(data: any) {
    return request({
        url: 'tienchin/activity/export',
        method: 'post',
        data,
        // 改成二进制的文本形式
        responseType: "blob"
    });
}